namespace ECommerce.Web.DesignByContract
{
    public static class Contract
    {
        public static void Require(bool assertion, string message)
        {
            if (!assertion)
            {
                throw new PreconditionException(message);
            }
        }

        public static void Ensure(bool assertion, string message)
        {
            if (!assertion)
            {
                throw new PostconditionException(message);
            }
        }
    }
}